package com.atguigu.gmall.product.service.impl;


import com.atguigu.gmall.model.product.SpuImage;
import com.atguigu.gmall.product.service.BaseSpuImageService;
import com.atguigu.gmall.product.mapper.BaseSpuImageMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Dell
* @description 针对表【spu_image(商品图片表)】的数据库操作Service实现
* @createDate 2022-05-18 20:24:28
*/
@Service
public class BaseSpuImageServiceImpl extends ServiceImpl<BaseSpuImageMapper, SpuImage>
implements BaseSpuImageService {

    @Override
    public List<SpuImage> getSpuImageList(Long spuId) {
        QueryWrapper<SpuImage> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("spu_id",spuId);
        return baseMapper.selectList(queryWrapper);
    }
}
